#include<iostream>
using namespace std;
int main(){
	int n, k;
	while (cin >> n){
		if (n){
			for (int i = 1; i <= n; i++){
				k = 1;
				for (int j = 1; j < i; j++){
					cout << k << " ";
					k = k*(i-j)/j;
				}
				cout << k << endl;
			}
		}else{
			break;
		}
	} 
	return 0;
} 
